<?php

/**
 * Définition des routes du site web
 * c.a.d. Les URLS valides
 */


$route['*']['/'] = array('DisplayController', 'index');
$route['*']['/page-accueil-bar-brasserie-alliance.html'] = array('DisplayController', 'index');
$route['*']['/menu'] = array('DisplayController', 'menu');
$route['*']['/evenements'] = array('DisplayController', 'evenements');
$route['*']['/photos'] = array('DisplayController', 'photos');
$route['*']['/contact'] = array('DisplayController', 'contact');
$route['*']['/newsletter-add'] = array('DisplayController', 'newsletterAdd');
$route['*']['/search'] = array('DisplayController', 'search');


$route['*']['/gestion'] = array('MainController', 'index');
$route['*']['/error'] = array('ErrorController', 'index');

$route['*']['/admin/deconnexion'] = array('[globalbo]GlobalBO', 'deconnexion');
$route['*']['/admin/Dashboard'] = array('[globalbo]GlobalBO', 'index');
$route['*']['/admin/options'] = array('[globalbo]GlobalBO', 'options');
$route['*']['/admin/options/:mod'] = array('[globalbo]GlobalBO', 'options');
$route['*']['catchall']['/admin/:module/:controller/:method'] = array('[globalbo]GlobalBO', 'redirect');


//---------- Delete if not needed ------------
$admin = array('admin'=>'1234');

//view the logs and profiles XML, filename = db.profile, log, trace.log, profile
$route['*']['/debug/:filename'] = array('MainController', 'debug', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!');

//show all urls in app
$route['*']['/allurl'] = array('MainController', 'allurl', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!');

//generate routes file. This replace the current routes.conf.php. Use with the sitemap tool.
$route['post']['/gen_sitemap'] = array('MainController', 'gen_sitemap', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!');

//generate routes & controllers. Use with the sitemap tool.
$route['post']['/gen_sitemap_controller'] = array('MainController', 'gen_sitemap_controller', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!');

//generate Controllers automatically
$route['*']['/gen_site'] = array('MainController', 'gen_site', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!');

//generate Models automatically
$route['*']['/gen_model'] = array('MainController', 'gen_model', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!');


?>